﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
namespace Presentation
{
    public partial class Form3 :DevComponents.DotNetBar.Office2007RibbonForm
    {
        public Form3()
        {
            InitializeComponent();
            //styleManager1.ManagerStyle = eStyle.Office2007Black;
            
            
        }

        private void mnuTheLoai_Click(object sender, EventArgs e)
        {
            foreach (Form i in this.MdiChildren)
            {
                if (i.Name=="TheLoai")
                {
                    this.ActivateMdiChild(i);
                    return;
                }
            }
            frmQuanLyTheLoai f = new frmQuanLyTheLoai();
            f.Name = "TheLoai";
            f.MdiParent = this;
            f.Dock = DockStyle.Fill;
            f.Show();
        }

       

        private void cbxStyle_Click(object sender, EventArgs e)
        {
            //asdasdasd
        }

        private void cbxStyle_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void mnuLapPhieuNhapSach_Click(object sender, EventArgs e)
        {
            frmLapPhieuNhapSach f = new frmLapPhieuNhapSach();
            f.MdiParent = this;
            f.Dock = DockStyle.Fill;
            f.Show();
        }

        private void buttonItem7_Click(object sender, EventArgs e)
        {

        }

        private void mnuDauSach_Click(object sender, EventArgs e)
        {
            foreach (Form i in this.MdiChildren)
            {
                if (i.Name == "DauSach")
                {
                    this.ActivateMdiChild(i);
                    return;
                }
            }
            frmQuanLySach f = new frmQuanLySach();
            f.Name = "DauSach";
            f.MdiParent = this;
            f.Dock = DockStyle.Fill;
            f.Show();
        }

        private void mnuTacGia_Click(object sender, EventArgs e)
        {
            foreach (Form i in this.MdiChildren)
            {
                if (i.Name == "TacGia")
                {
                    this.ActivateMdiChild(i);
                    return;
                }
            }
            frmQuanLyTacGia f = new frmQuanLyTacGia();
            f.Name = "TacGia";
            f.MdiParent = this;
            f.Dock = DockStyle.Fill;
            f.Show();
        }

        private void mnuLapHoaDonBanSach_Click(object sender, EventArgs e)
        {
            foreach (Form i in this.MdiChildren)
            {
                if (i.Name == "LapHoaDonBanSach")
                {
                    this.ActivateMdiChild(i);
                    return;
                }
            }
            frmLapHoaDon f = new frmLapHoaDon();
            f.Name = "LapHodDon";
            f.MdiParent = this;
            f.Dock = DockStyle.Fill;
            f.Show();
        }

        private void mnuTraCuuSach_Click(object sender, EventArgs e)
        {
            foreach (Form i in this.MdiChildren)
            {
                if (i.Name == "TraCuuSach")
                {
                    this.ActivateMdiChild(i);
                    return;
                }
            }
            frmTraCuuSach f = new frmTraCuuSach();
            f.Name = "TraCuuSach";
            f.MdiParent = this;
            //f.Dock = DockStyle.Fill;
            f.Show();
        }

        private void mnuLapPhieuThuTien_Click(object sender, EventArgs e)
        {
            foreach (Form i in this.MdiChildren)
            {
                if (i.Name == "LapPhieuThuTien")
                {
                    this.ActivateMdiChild(i);
                    return;
                }
            }
            frmLapPhieuThuTien f = new frmLapPhieuThuTien();
            f.Name = "LapPhieuThuTien";
            f.MdiParent = this;
            f.Dock = DockStyle.Fill;
            f.Show();
        }

        private void mnuQuanLyKhachHang_Click(object sender, EventArgs e)
        {
            foreach (Form i in this.MdiChildren)
            {
                if (i.Name == "QuanLyKhachHang")
                {
                    this.ActivateMdiChild(i);
                    return;
                }
            }
             frmLapPhieuThuTien f= new frmLapPhieuThuTien();
            f.Name = "QuanLyKhachHang";
            f.MdiParent = this;
            f.Dock = DockStyle.Fill;
            f.Show();
        }
    }
}
